home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_libmpeg / README.{_2 < prev   
Text File  |  1999-09-17  |  8KB  |  173 lines

  1.                The MPEG Library
  2.  
  3.              Version 1.2 - 17 October, 1995
  4.  
  5. MPEG decoding engine (c) 1992 The Regents of the University of California
  6. Front end (c) 1994-95 Gregory P. Ward (greg@bic.mni.mcgill.ca)
  7.  
  8. The MPEG Library is a collection of C routines to decode MPEG movies
  9. and dither them in a variety of colour schemes.  Most of the code in
  10. the library comes directly from the Berkely MPEG player, an
  11. X11-specific implementation that works fine, but suffers from minimal
  12. documentation and a lack of modularity.  A front end to the Berkeley
  13. decoding engine was developed by Greg Ward at the Montreal
  14. Neurological Institute in May/June 1994 to facilitate the development
  15. of an MPEG player specifically for Silicon Graphics workstations; the
  16. decoding engine together with the MNI front end constitute the MPEG
  17. Library.
  18.  
  19.  
  20. AVAILABILITY
  21. ============
  22.  
  23. Both the above-mentioned SGI-specific MPEG player (glmpeg_play) and
  24. the MPEG Library itself are available from ftp.mni.mcgill.ca, in
  25. /pub/mpeg.  Several other MPEG-related goodies are gathered here as
  26. well, in particular the MPEG encoder/decoder from the Portable Video
  27. Research Group at Stanford University.
  28.  
  29. The original Berkeley decoder is available via anonymous ftp from
  30. mm-ftp.cs.berkeley.edu, in the directory /pub/multimedia/mpeg/play.
  31.  
  32.  
  33. BUILDING THE LIBRARY
  34. ====================
  35.  
  36. New with version 1.2 -- a configure script!  This should remove most
  37. of the problems people have had, as well as the headache of editing
  38. the Makefile.  In the most general case, all you have to do is:
  39.  
  40.     ./configure
  41.     make
  42.  
  43. However, if you are building the library exclusively to use with
  44. ImageMagick, you can save a bit of code size (about 60k on most RISC
  45. platforms by my experience) by omitting most of the fancy dithering
  46. methods supplied with the library.  In this case, just run
  47. "./configure --disable-dither", and you will build a reduced version
  48. of the library.  This is not necessary to compile or link successfully
  49. -- it'll just save a little space.
  50.  
  51. Also, if you plan to link with the HDF library, or with the
  52. Independent JPEG Group's JPEG library, there is a bit of code overlap
  53. with the MPEG Library.  If you configure the MPEG Library with
  54. "./configure --disable-jpeg", then the redundant code will not be
  55. included in the MPEG Library, making an error-free link possible.
  56. Note however that this will result in a crippled version of the MPEG
  57. Library -- it will *not* link successfully unless you also link with
  58. the JPEG or HDF libraries.  If you need the MPEG Library for both HDF
  59. and non-HDF (or JPEG and non-JPEG) applications, I'm afraid you'll
  60. need to keep two copies of the MPEG Library on hand.  (Sorry.)
  61.  
  62. Also, you can *not* build the library itself with a non-ANSI compiler.
  63. The configure script makes a good attempt to find an ANSI compiler: on
  64. SGI platforms, it uses `cc'; on HP-UX platforms, it uses `cc -Aa'; on
  65. all other platforms, it looks for gcc.  If gcc isn't found, it uses
  66. the native C compiler (cc) but first makes sure that cc is fairly
  67. ANSI-ish.  If not, it dies -- you'll need to get gcc for your platform
  68. in order to build the library.
  69.  
  70. However, it is possible to build programs that *use* the library with
  71. a non-ANSI compiler, as the header file mpeg.h has the requisite
  72. kludges that allow it be compiled with either ANSI or non-ANSI
  73. compilers.
  74.  
  75. Anyone who has problems configuring or compiling the MPEG Library, or
  76. linking it with other software should contact me
  77. (greg@bic.mni.mcgill.ca).
  78.  
  79.  
  80. HOW TO USE THE LIBRARY
  81. ======================
  82.  
  83. There is a short but (hopefully) complete document in the "doc/"
  84. subdirectory of the MPEG Library distribution.  This is supplied in
  85. both PostScript form and as LaTeX 2e source.  If you have any problems
  86. with the documentation, please let me know -- this is a first draft,
  87. and I'm open to suggestions on how to improve it.
  88.  
  89.  
  90. EXAMPLES AND TESTING
  91. ====================
  92.  
  93. For a very simple MPEG player that uses the SGI Graphics Library to
  94. display frames, take a look at easympeg.c, included in the "extras/"
  95. subdirectory of this distribution.  (If you configured and built the
  96. library on an SGI platform, easympeg should have been automatically
  97. built for you.)  Even if you don't have an SGI, the source code can be
  98. instructive -- the calls to GL functions are not too intrusive, and
  99. not too hard to figure out either.
  100.  
  101. There is also a simple, portable program to test the Library:
  102. extras/mpegtest.c.  It is similar in structure to easympeg, with any
  103. display-related code removed, and with the addition of code to time
  104. the playback and to compute simple image checksums.  The timing code
  105. may be of interest (eg. to answer questions such as "Can I achieve a
  106. playback rate of X on platform Y?" or "How much faster will playback
  107. be if I dither to shades of gray instead of full 24-bit colour?"), and
  108. the checksum code provides a way to ensure that the library returns
  109. identical results across platforms.  Run "mpegtest <mpegfile>" to just
  110. get timing information on the MPEG in <mpegfile>; add the "-checksum"
  111. option to get checksum information; add "-dither <mode>" to try out
  112. various dithering modes.  The possible values of <mode> are: "hybrid",
  113. "hybrid2", "fs4", "fs2", "fs2fast", "2x2", "gray", "fullcolor",
  114. "none", "ordered", "mono", "mono_threshold", "ordered2", and
  115. "mbordered".
  116.  
  117. A tiny MPEG stream, test.mpg, is included with the distribution.  You
  118. can try mpegtest and easympeg on it, but there are some known
  119. problems: easympeg tends to dump core on this file, and mpegtest
  120. doesn't always return the same checksums across different platforms.
  121. Hopefully, future releases will address whatever bugs underly these
  122. problems!
  123.  
  124. I have also written glmpeg_play, a full-fledged MPEG player for SGI
  125. platfoms (with frame-buffering, interactive controls, dynamic zooming,
  126. etc.).  It is available via anonymous ftp as explained above.
  127.  
  128.  
  129. ACKNOWLEDGEMENTS
  130. ================
  131.  
  132. Thanks to John Cristy for making the MPEG Library an optional add-on
  133. to ImageMagick, providing me with more free publicity (and lots of
  134. traffic on our ftp site!) than I could have imagined, and for
  135. suggesting some important fixes early on.  Also to Magnus Heldestat
  136. for providing patches to speed up full-colour dithering; and to Andrew
  137. Kuchling for extensive testing of beta versions of 1.2 on a variety of
  138. Unix platforms.
  139.  
  140.  
  141. COMPLETE LACK OF WARRANTY
  142. =========================
  143.  
  144. This software is supplied without even the faintest shred of assurance
  145. that it works in its entirety.  
  146.  
  147. Copyright (c) 1994-95 by Gregory P. Ward.
  148. All rights reserved.
  149.  
  150. This file is part of the MNI front end of the Berkeley MPEG decoder.
  151.  
  152. Permission to use, copy, modify, and distribute this software and its
  153. documentation for any purpose, without fee, and without written agreement is
  154. hereby granted, provided that the above copyright notice and the following
  155. two paragraphs appear in all copies of this software.
  156.  
  157. IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT,
  158. INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
  159. OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE
  160. UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
  161. SUCH DAMAGE.
  162.  
  163. THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT
  164. NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  165. FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER
  166. IS ON AN "AS IS" BASIS, AND THE AUTHOR HAS NO OBLIGATION TO PROVIDE
  167. MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.  
  168.  
  169. Please drop me a line if you use the MPEG Library, either successfully
  170. or not.  And if you use it unsuccessfully and find a nice, easy fix,
  171. do please let me know about it!  My email address is
  172. greg@bic.mni.mcgill.ca.
  173.